<template>
	<view class="content">
		<image src="/static/img/index/kaiping.png" class="kaip" mode=""></image>
	</view>
</template>

<script>
	import {
		userinfo
	} from '@/api/user.js'
	export default {
		data() {
			return {

			}
		},
		onLoad() {
			// 判断是否登录，token是否有效
			setTimeout(() => {
				userinfo().then(res => {
					if (res.data.code == 200) {
						uni.switchTab({
							url: '/pages/tabbar/home'
						})
					} else {
						// 跳转登录
						uni.reLaunch({
							url: '/pages/index/login'
						})
					}
				})
			}, 2000)

		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.content {
		width: 100vw;
		height: 100vh;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.kaip {
		width: 322.22rpx;
		height: 137.5rpx;
	}
</style>